libostree: mark ostree_repo_checkout_tree_at as deprecated
authorGiuseppe Scrivano <gscrivan@redhat.com>
Wed, 27 Jul 2016 09:11:13 +0000 (11:11 +0200)
committerAtomic Bot <atomic-devel@projectatomic.io>
Sat, 30 Jul 2016 11:24:52 +0000 (11:24 +0000)
and move its definition to a separate file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #417
Approved by: cgwalters

Makefile-libostree-defines.am
Makefile-libostree.am
src/libostree/ostree-repo-checkout.c
src/libostree/ostree-repo-deprecated.h [new file with mode: 0644]
src/libostree/ostree-repo.h

index 2d478bb6c8ed348563af6a026979e306e46942ad..e3ec3950c1ebcc9810462d95034941838018dbe2 100644 (file)
@@ -35,4 +35,5 @@ libostree_public_headers = \
        src/libostree/ostree-sysroot-upgrader.h \
        src/libostree/ostree-deployment.h \
        src/libostree/ostree-bootconfig-parser.h \
+       src/libostree/ostree-repo-deprecated.h \
        $(NULL)
index efddd37d10a92603f3597616f930b13b2af218f9..0be60a18d2bcae91e1e13bc40caca0215eb9a4e9 100644 (file)
@@ -205,7 +205,8 @@ gpgreadmedir = $(pkgdatadir)/trusted.gpg.d
 EXTRA_DIST += src/libostree/README-gpg src/libostree/bupsplit.h \
                src/libostree/ostree-enumtypes.h.template \
                src/libostree/ostree-enumtypes.c.template \
-               src/libostree/ostree-deployment-private.h
+               src/libostree/ostree-deployment-private.h \
+               src/libostree/ostree-repo-deprecated.h
 
 install-mkdir-remotes-d-hook:
        mkdir -p $(DESTDIR)$(sysconfdir)/ostree/remotes.d
index 1010d2396c250f5dcf1524a8cb573fce4e95ab39..4e0f0a2352ad6879be881ab4e3cfd91e3a66b32e 100644 (file)
@@ -844,6 +844,8 @@ ostree_repo_checkout_tree (OstreeRepo               *self,
  * Note in addition that unlike ostree_repo_checkout_tree(), the
  * default is not to use the repository-internal uncompressed objects
  * cache.
+ *
+ * This function is deprecated.  Use ostree_repo_checkout_at() instead.
  */
 gboolean
 ostree_repo_checkout_tree_at (OstreeRepo                        *self,
diff --git a/src/libostree/ostree-repo-deprecated.h b/src/libostree/ostree-repo-deprecated.h
new file mode 100644 (file)
index 0000000..bb4b09d
--- /dev/null
@@ -0,0 +1,69 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ *
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#pragma once
+
+#include "ostree-core.h"
+#include "ostree-types.h"
+
+#ifndef G_GNUC_DEPRECATED_FOR
+# define G_GNUC_DEPRECATED_FOR(x)
+#endif
+
+G_BEGIN_DECLS
+
+/**
+ * OstreeRepoCheckoutOptions: (skip)
+ *
+ * An extensible options structure controlling checkout.  Ensure that
+ * you have entirely zeroed the structure, then set just the desired
+ * options.  This is used by ostree_repo_checkout_tree_at() which
+ * supercedes previous separate enumeration usage in
+ * ostree_repo_checkout_tree().
+ */
+typedef struct {
+  OstreeRepoCheckoutMode mode;
+  OstreeRepoCheckoutOverwriteMode overwrite_mode;
+
+  guint enable_uncompressed_cache : 1;
+  guint disable_fsync : 1;
+  guint process_whiteouts : 1;
+  guint no_copy_fallback : 1;
+  guint reserved : 28;
+
+  const char *subpath;
+
+  OstreeRepoDevInoCache *devino_to_csum_cache;
+
+  guint unused_uints[6];
+  gpointer unused_ptrs[7];
+} OstreeRepoCheckoutOptions;
+
+_OSTREE_PUBLIC
+gboolean ostree_repo_checkout_tree_at (OstreeRepo                         *self,
+                                       OstreeRepoCheckoutOptions          *options,
+                                       int                                 destination_dfd,
+                                       const char                         *destination_path,
+                                       const char                         *commit,
+                                       GCancellable                       *cancellable,
+                                       GError                            **error)
+G_GNUC_DEPRECATED_FOR(ostree_repo_checkout_at);
+
+G_END_DECLS
index 28766a24596843e129e37a1beff23fd2790dbb4b..04f467d2d89e6e99752defd2aef70b0227fb962e 100644 (file)
@@ -735,33 +735,6 @@ ostree_repo_checkout_tree (OstreeRepo               *self,
                            GCancellable             *cancellable,
                            GError                  **error);
 
-/**
- * OstreeRepoCheckoutOptions: (skip)
- *
- * An extensible options structure controlling checkout.  Ensure that
- * you have entirely zeroed the structure, then set just the desired
- * options.  This is used by ostree_repo_checkout_tree_at() which
- * supercedes previous separate enumeration usage in
- * ostree_repo_checkout_tree().
- */
-typedef struct {
-  OstreeRepoCheckoutMode mode;
-  OstreeRepoCheckoutOverwriteMode overwrite_mode;
-  
-  guint enable_uncompressed_cache : 1;
-  guint disable_fsync : 1;
-  guint process_whiteouts : 1;
-  guint no_copy_fallback : 1;
-  guint reserved : 28;
-
-  const char *subpath;
-
-  OstreeRepoDevInoCache *devino_to_csum_cache;
-
-  guint unused_uints[6];
-  gpointer unused_ptrs[7];
-} OstreeRepoCheckoutOptions;
-
 /**
  * OstreeRepoCheckoutAtOptions:
  *
@@ -797,15 +770,6 @@ OstreeRepoDevInoCache * ostree_repo_devino_cache_ref (OstreeRepoDevInoCache *cac
 _OSTREE_PUBLIC
 void ostree_repo_devino_cache_unref (OstreeRepoDevInoCache *cache);
 
-_OSTREE_PUBLIC
-gboolean ostree_repo_checkout_tree_at (OstreeRepo                         *self,
-                                       OstreeRepoCheckoutOptions          *options,
-                                       int                                 destination_dfd,
-                                       const char                         *destination_path,
-                                       const char                         *commit,
-                                       GCancellable                       *cancellable,
-                                       GError                            **error);
-
 _OSTREE_PUBLIC
 gboolean ostree_repo_checkout_at (OstreeRepo                         *self,
                                   OstreeRepoCheckoutAtOptions        *options,
@@ -1123,3 +1087,8 @@ gboolean ostree_repo_regenerate_summary (OstreeRepo     *self,
 
 
 G_END_DECLS
+
+
+/* Include here as the functions defined before should not depend on anything which
+   is defined in -deprecated.h.  */
+#include "ostree-repo-deprecated.h"